<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1"/>
    <meta name="renderer" content="webkit"/>
    <title>权限管理</title>
    <!--加载后执行save.js-->
    <script data-main="save.js" src="../boot.js" type="text/javascript"></script>
</head>
<body style="display: none">
<div class="mini-fit">
    <div id="tabs" class="mini-tabs" activeIndex="0" style="width:100%;height:94%;margin: auto" plain="true">
        <div title="基本信息">
            <div class="mini-fit dynamic-form main-panel components mini-clearfix " id="basic-info">
                <div class="mini-col-6 form-component">
                    <div class="form-item brick"><label class="form-label edit-focus">权限标识</label>
                        <div class="input-block component-body">
                            <input required emptyText="只能由字母数字下划线组成" style="width: 100%" name="id"
                                   class="mini-textbox"/>
                        </div>
                    </div>
                </div>
                <div class="mini-col-6 form-component" >
                    <div class="form-item brick"><label class="form-label">权限名称</label>
                        <div class="input-block component-body">
                            <input required style="width: 100%" name="name" class="mini-textbox"/>
                        </div>
                    </div>
                </div>

                <div class="mini-col-6 form-component" >
                    <div class="form-item brick form-text"><label class="form-label edit-focus">支持的数据权限控制方式</label>
                        <div class="input-block component-body">
                            <input data="allSupportDataAccessTypes" name="supportDataAccessTypes"
                                   multiSelect="true" style="width: 100%" class="mini-combobox"/>
                        </div>
                    </div>
                </div>

                <div class="mini-col-6 form-component" >
                    <div class="form-item brick form-text"><label class="form-label edit-focus">分类</label>
                        <div class="input-block component-body">
                            <input data="types" name="type"
                                   multiSelect="true" style="width: 100%" class="mini-combobox"/>
                        </div>
                    </div>
                </div>


                <!--                <div class="mini-col-12 form-component" hs-id="bfae629f4c9043d459830c740e808eb8">-->
<!--                    <div class="form-item brick form-text"><label class="form-label edit-focus">备注</label>-->
<!--                        <div class="input-block component-body">-->
<!--                            <input name="describe" style="width: 100%;height: 25px" class="mini-textarea"/>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->

                <div class="mini-col-12 form-component">
                    <div class="form-item brick form-text"><label class="form-label edit-focus">操作配置</label>
                        <div class="input-block component-body">
                               <div id="action-grid" class="mini-datagrid" style="width:100%;height:auto;margin: auto;"
                                    idField="action"
                                    allowCellEdit="true" allowCellSelect="true" showPager="false"
                                    editNextOnEnterKey="true" editNextRowCell="true" navEditMode="true">
                                   <div property="columns">
                                       <div name="action" field="action" headerAlign="center" align="center" width="60">标识
                                           <input property="editor" emptyText="e.g. query update" class="mini-textbox"/>
                                       </div>
                                       <div field="describe" width="100" headerAlign="center" align="center">描述
                                           <input property="editor" class="mini-textarea"/>
                                       </div>
                                       <div field="defaultCheck" renderer="rendererTrueFalse" width="60"
                                            headerAlign="center"
                                            align="center">默认选中
                                           <input property="editor" data="[{text:'是',id:true},{text:'否',id:false}]"
                                                  class="mini-combobox"/>
                                       </div>
                                       <div name="supportDataAccess" field="properties.supportDataAccess" width="160" headerAlign="center"
                                            align="center">支持数据权限
                                           <input property="editor" multiSelect="true" style="width: 100%" class="mini-combobox"/>
                                       </div>
                                       <div renderer="renderAction" width="40" headerAlign="center" align="center">
                                           <span class="title-button" style="width: 30px">操作</span>
                                           <span class="title-button icon-add"
                                                 onclick="mini.get('action-grid').addRow({})"></span>

                                       </div>
                                   </div>
                               </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <div title="关联权限">
            <div class="mini-fit">
                <div id="parent-grid" class="mini-datagrid" style="width:100%;height:100%;margin: auto;"
                     idField="action" allowCellEdit="true" allowCellSelect="true" showPager="false"
                     editNextOnEnterKey="true" editNextRowCell="true" navEditMode="true">
                    <div property="columns">
                        <div name="preActions" field="preActions" headerAlign="center" align="center" width="80">前置操作
                            <input property="editor" valueField="action" multiSelect="true" style="width: 100%" class="mini-combobox"/>
                        </div>
                        <div name="permission" field="permission" headerAlign="center" align="center" width="80">关联权限
                            <input property="editor" allowInput="true" style="width: 100%" class="mini-combobox"/>
                        </div>
                        <div name="actions" field="actions"  headerAlign="center" align="center" width="80">关联操作
                            <input property="editor"  multiSelect="true" valueField="action" allowInput="true" style="width: 100%" class="mini-combobox"/>
                        </div>
                        <div renderer="renderAction" width="40" headerAlign="center" align="center">
                            <span class="title-button" style="width: 30px">操作</span><span class="title-button icon-add"
                                    onclick="mini.get('parent-grid').addRow({})"></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div title="数据视图">
            <div class="mini-fit">
                <div id="field-accesses-grid" class="mini-datagrid" style="width:100%;height:100%;margin: auto;"
                     idField="action" allowCellEdit="true" allowCellSelect="true" showPager="false"
                     editNextOnEnterKey="true" editNextRowCell="true" navEditMode="true">
                    <div property="columns">
                        <div name="name" field="name" headerAlign="center" align="center" width="80">字段
                            <input property="editor" emptyText="e.g name" class="mini-textbox"/>
                        </div>
                        <div field="describe" width="80" headerAlign="center" align="center">描述
                            <input property="editor" class="mini-textarea"/>
                        </div>
                        <div renderer="renderAction" width="40" headerAlign="center" align="center">
                            <span class="title-button" style="width: 30px">操作</span><span class="title-button icon-add"
                                    onclick="mini.get('field-accesses-grid').addRow({})"></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div style="width: 100px;margin: auto"><a class="mini-button save-button" iconCls="icon-save">保存</a></div>
</div>
</body>
</html>